<?php

namespace app\web\controller;

use app\common\cachemodel\zl6\Zl6Meditation;
use app\common\lib\Util;
use think\Controller;

class Meditate extends Controller
{
    public function use_guide()
    {
        $mid = input('id/d', 0);
        $zl6MeditationModel = new Zl6Meditation();
        $meditationInfo = $zl6MeditationModel->getInfoById($mid, ['guide_img']);

        $url = $meditationInfo['guide_img'] ?? '';
        if ($url)
        {
            $url = Util::getImgUrl($url);
        }

        return $this->fetch('', [
            'url' => $url
        ]);
    }
}